/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-05-09 11:02:48
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-06-06 14:32:23
 * @FilePath: \ken147258.topayClient\src\api\other\order.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */


import request from "@/utils/request";
import { AxiosPromise } from "axios";

const URL = {
  order_list: '/platformApi/payment/order/list',
  payment_stat: '/platformApi/payment/stat',
  log: '/platformApi/payment/log',
  success: '/platformApi/payment/success',
  assign: '/platformApi/payment/assign',
  close: '/platformApi/payment/close',
  stat: '/platformApi/payment/order/stat',
};

export function order_list(data: object): AxiosPromise<any> {
  return request({
    url: URL.order_list,
    method: "get",
    params: data,
  });
}

export function stat(data: object): AxiosPromise<any> {
  return request({
    url: URL.stat,
    method: "get",
    params: data,
  });
}

export function payment_stat(data: object): AxiosPromise<any> {
  return request({
    url: URL.payment_stat,
    method: "get",
    params: data,
  });
}

export function log(data: object): AxiosPromise<any> {
  return request({
    url: URL.log,
    method: "get",
    params: data,
  });
}

export function success(data: object): AxiosPromise<any> {
  return request({
    url: URL.success,
    method: "post",
    data: data,
  });
}

export function assign(data: object): AxiosPromise<any> {
  return request({
    url: URL.assign,
    method: "post",
    data: data,
  });
}

export function close(data: object): AxiosPromise<any> {
  return request({
    url: URL.close,
    method: "post",
    data: data,
  });
}
